﻿var beacon;
var silverlightImage;
function resultBeacon(linktype,url) {
    
    var src = "";
    if (!url)
    {
        src = "http://mscommunities.com/beacon.ashx?t=" + escape(linktype);
        beacon = new Image();    
        beacon.src = src;
        return true;
    }
    else
    {
        src = "http://mscommunities.com/beacon.ashx?t=" + escape(linktype) + "&u=" + escape(url);
        window.location = src;
        return false;
    }
}

function checkSilverlight()
{
    if (window.Silverlight)
    {
        try
        { 
            if (Silverlight.isInstalled('2.0'))
            {
                slv = '2.0';
            }
            else 
            {
                if (Silverlight.isInstalled('1.1'))
                    {
                        slv = '1.1';
                    }
                else
                    {
                     if (Silverlight.isInstalled('1.0'))
                        {
                            slv = '1.0';
                        }
                     else
                        {
                            if (Silverlight.supportedUserAgent('1.0'))
                            {
                                slv='not installed';
                            }
                            else
                            {
                                slv = 'unsupported';
                            }                        
                        }
                    }
            }
        }
        catch (e) {
            slv = 'error';
        }
        
        var src = "";
        src = "http://mscommunities.com/silverlight.ashx?slv=" + escape(slv);
        silverlightImage = new Image();    
        silverlightImage.src = src;
    }
}

checkSilverlight();